﻿@namespace CodeManDesktopBlazor.BlazorComponents.Pages.codeTemple
@typeparam K
@typeparam T
@{
    int count = 0;
}

<div class="div-code">
    <p class="p-n">
		using System;
		using System.Collections.Generic;
		using System.Linq;
		using System.Text;
		using System.Threading.Tasks;
    </p>
    <br />
    @if (!Model.classGenDTO.Namespace.IsNullOrEmpty())
    {
        <p class="p-n">namespace @Model.classGenDTO.Namespace</p>
        <p class="p-n">{</p>
    }
    @if (!Model.classGenDTO.Desc.IsNullOrEmpty())
    {
        <p class="p-c">@("\n")/// @("<summary>")</p>
        <p class="p-c">/// @Model.classGenDTO.Desc</p>
        <p class="p-c">/// @("<summary>\n")</p>
    }
    <p class="p-c"> public class @(Model.classGenDTO.Name.ToTitleCaseAll()) : NotifyBase</p>
    <p class="p-c">{</p>
    @foreach (var item in Model.classAttributeDTOLst)
    {
        <p class="p-a">private @item.AType.GetDescription() _@item.AName.ToString().ToLower();</p>
        <p class="p-a">public @item.AType.GetDescription() @(item.AName.ToString().ToLower())
			{
				get { return _@(item.AName.ToString().ToLower());}
				<br />
				set
				{
					_@(item.AName.ToString().ToLower()) = value;
					RaisePropertyChanged("@(item.AName.ToString().ToLower())");
				}
			}
		</p>
    }

    <br />
    <p class="p-c">}</p>
    <br />
    @if (!Model.classGenDTO.Namespace.IsNullOrEmpty())
    {
        <p class="p-n">}</p>
    }
</div>

